]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
windowManager: ensure actor resize clone dies with actor
authorRay Strode <rstrode@redhat.com>
Thu, 7 Feb 2019 19:27:35 +0000 (14:27 -0500)
committerFlorian Müllner <florian.muellner@gmail.com>
Wed, 17 Apr 2019 18:31:22 +0000 (18:31 +0000)
If a window gets destroyed right before it's resize
animation starts the user can get confronted with an undead
zombie clone that doesn't go away.

This commit makes sure said clones get reaped with their
actors.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/1166

js/ui/windowManager.js

index 09eeac105ecf61523996d18b5b1a579b0f476a08..b9f5fef46a476fd736b3c1f03bd46ac4f5cb7cc5 100644 (file)
@@ -1488,8 +1488,13 @@ var WindowManager = class {
         if (this._clearAnimationInfo(actor))
             this._shellwm.completed_size_change(actor);
 
+        let destroyId = actor.connect('destroy', () => {
+            this._clearAnimationInfo(actor);
+        });
+
         actor.__animationInfo = { clone: actorClone,
-                                  oldRect: oldFrameRect };
+                                  oldRect: oldFrameRect,
+                                  destroyId: destroyId };
     }
 
     _sizeChangedWindow(shellwm, actor) {
@@ -1550,6 +1555,7 @@ var WindowManager = class {
     _clearAnimationInfo(actor) {
         if (actor.__animationInfo) {
             actor.__animationInfo.clone.destroy();
+            actor.disconnect(actor.__animationInfo.destroyId);
             delete actor.__animationInfo;
             return true;
         }